import React from 'react'
import { Link } from 'react-router-dom'

import moment from 'moment'

class MyNotificationList extends React.Component {
    render() {
      return (
        null
      );
    }
}

import InfiniteLoading from '../../../components/infinite-loding-hoc'
let url = '/mem/messages',
    classname='tidings',
    row = (x, sectionID, rowID) => {
        return (
            <Link to={`/notification/detail/${x.id}`} key={x.id}>
                <div class="tid-list">
                    <div class="p1">
                        <p>{x.sys_message.title}</p>
                        {x.read==1&&<i></i>}
                    </div>
                    <div class="p2">
                        <p>{x.sys_message.content}</p>
                        <em>{moment(x.sys_message.created_at).format('l')}</em>
                    </div>
                </div>
            </Link>
        )
    }
export default InfiniteLoading(url, row, classname)(MyNotificationList)